﻿#include"Stack.h"
#include"Queue.h"
void test1()
{
	ST st;
	STInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);

	//StackPop(&st);
	//StackPop(&st);
	//StackPop(&st);
	//StackPop(&st);
	//StackPop(&st);

	while (!StackEmpty(&st))
	{
		STDataType top = StackTop(&st);
		printf("%d ", top);
		StackPop(&st);
	}

	STDestroy(&st);
}
void test2()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	//while (QueueSize(&q))
	//{
	//	printf("%d\n", QueueSize(&q));
	//	QueuePop(&q);
	//}

	printf("phead:%d\n", QueueFront(&q));
	printf("ptail:%d\n", QueueBack(&q));

	QueueDestroy(&q);
}
int main()
{
	test2();
	return 0;
}